<?php

class CredentialsTable extends Doctrine_Table
{

    public static function getInstance()
    {
        return Doctrine_Core::getTable('Credentials');
    }

    public static function getNameById($id)
    {
        $query = self::getInstance()->createQuery();
        $query->where('id = ?', $id);
        $obj = $query->fetchOne();

        return $obj ? $obj->name : '';
    }

}
